package com.teamfractal.fracdustry.common.fluid.init;

import com.teamfractal.fracdustry.common.Fracdustry;
import com.teamfractal.fracdustry.common.block.init.FDBlocks;
import com.teamfractal.fracdustry.common.item.init.FDItems;
import com.teamfractal.fracdustry.common.util.FDRegistryHandler;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.fluids.FluidAttributes;
import net.minecraftforge.fmllegacy.RegistryObject;

public class FDFluids {
    public static final ResourceLocation PETROLEUM_STILL = new ResourceLocation(Fracdustry.MODID
            , "block/fluids/petroleum_still");
    public static final ResourceLocation PETROLEUM_FLOW = new ResourceLocation(Fracdustry.MODID
            , "block/fluids/petroleum_flow");
    public static RegistryObject<RedactedFlowingFluid> petroleumFluidStill;
    public static RegistryObject<RedactedFlowingFluid> petroleumFluidFlowing;
    public static RedactedFlowingFluid.Properties petroleumProperties;

    public static void register(){
        petroleumFluidStill = FDRegistryHandler.Fluids.register("petroleum_fluid"
                , () -> new RedactedFlowingFluid.Source(petroleumProperties));
        petroleumFluidFlowing = FDRegistryHandler.Fluids.register("petroleum_fluid_flowing"
                , () -> new RedactedFlowingFluid.Flowing(petroleumProperties));
        petroleumProperties = new RedactedFlowingFluid.Properties(petroleumFluidStill, petroleumFluidFlowing,
                FluidAttributes.builder(PETROLEUM_STILL, PETROLEUM_FLOW)
                        .density(900).viscosity(4000)).bucket(FDItems.bucketPetroleum).block(FDBlocks.fluidPetroleum).slopeFindDistance(3).explosionResistance(100F);
    }
}
